package com.assignwork.service;

import com.assignwork.dto.AssignWorkDTO;
import com.assignwork.dto.LineAuditDTO;
import com.assignwork.dto.WorkArrangeShipSearchDTO;
import com.assignwork.dto.WorkArrangeShipSubmitDTO;
import com.assignwork.entity.WorkArrangeShip;
import com.assignwork.vo.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.secure.BladeUser;

import java.util.List;

/**
 * @ClassName IWorkArrangeShipService
 * @Description 航运配工接口
 * @Author dujianyu
 * @Date 2023/12/21 15:48
 */
public interface IWorkArrangeShipService extends BaseService<WorkArrangeShip> {
    /**
     * 新增或修改
     * @param dto 数据
     * @return boolean
     * @author dujianyu
     * @since 2023/12/21 16:01
     */
    boolean submitWaShip(WorkArrangeShipSubmitDTO dto);

    /**
     * 分页
     * @param dto 搜索条件
     * @param page 分页
     * @return IPage<WorkArrangeShipPageVO>
     * @author dujianyu
     * @since 2023/12/21 16:03
     */
    IPage<WorkArrangeShipPageVO> selectWaShipPage(WorkArrangeShipSearchDTO dto, IPage<WorkArrangeShipPageVO> page);

    /**
     * 列表
     * @param dto 搜索条件
     * @return IPage<WorkArrangeShipPageVO>
     * @author dujianyu
     * @since 2023/12/21 16:03
     */
    List<WorkArrangeShipPageVO> selectWaShipList(WorkArrangeShipSearchDTO dto);

    /**
     * 级联删除
     * @param id 主键ID
     * @return boolean
     * @author dujianyu
     * @since 2023/12/21 16:15
     */
    boolean removeWaShip(Long id);

    List<WorkArrangeShipVO> listWorkArrangeShip(BladeUser bladeUser, AssignWorkDTO dto);

    /**
     * 计划信息
     * @param dto 搜索条件
     * @return PlanInfoVO
     * @author dujianyu
     * @since 2024/2/27 15:56
     */
    PlanInfoVO getPlanInfo(WorkArrangeShipSearchDTO dto);

    /**
     * 根据作业线和计划ID返回一个队组ID
     * @param dto 搜索条件
     * @return Long
     * @author dujianyu
     * @since 2024/4/16 15:38
     */
    Long getExistTeamId(WorkArrangeShipSearchDTO dto);

    List<WorkArrangeShipMobileVO> listWorkArrange4Mobile(IPage page, LineAuditDTO dto);

    WorkArrangeInfoVO arrangeInfoByArrangeId(Long arrangeId);
}
